package show.me.the.money.util.exp.standard;

import java.util.List;

import show.me.the.money.util.context.Context;
import show.me.the.money.util.exp.Expression;

@SuppressWarnings("unchecked")
public class NUM extends Expression {
	public Object run(List lsExp, Context ctx) {
		double d = 0;
		try {
			d = Double.parseDouble(String.valueOf(lsExp.get(1)));
		} 
		catch (Exception e) {
			logger.fatal("run JSONException:", e);
		}
		return d;
	}

	public String toString(List lsExp, Context ctx) {
		return String.valueOf(lsExp.get(1));
	}

}
